package com.ctsi.system.app.rest.response;

import com.ctsi.system.domain.DayCell;

import java.io.Serializable;

/**
 * @author zhangjw
 * @className Cell
 * @description
 * @date 2019/4/1 3:58
 **/
public class Cell implements Serializable {

    private String value;

    private boolean isFree;

    private int year;

    private int month;

    private int day;

    private String lunar;

    public Cell(String value, boolean isFree, int day, String lunar) {
        this.value = value;
        this.isFree = isFree;
        this.day = day;
        this.lunar = lunar;
    }

    public Cell(DayCell cell){
        if (cell.getCalendar() != null) {
            this.value = cell.getFormatDay();
            this.isFree = cell.isFree();
            this.day = cell.getDay();
            this.lunar = cell.getOldCalendar();
            this.month = cell.getMonth();
            this.year = cell.getYear();
        }
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public boolean isFree() {
        return isFree;
    }

    public void setFree(boolean free) {
        isFree = free;
    }

    public int getDay() {
        return day;
    }

    public void setDay(int day) {
        this.day = day;
    }

    public String getLunar() {
        return lunar;
    }

    public void setLunar(String lunar) {
        this.lunar = lunar;
    }
}
